<?php 
	require_once("init.php"); 
	require_once("functions.php"); 
?>

<?php 
	// Register new user account
	$qInsertVote = mysql_query("
		INSERT INTO votes (
			topicId,
			userId,
			answer,
			dateVoted
		)
		VALUES (
			'".$_GET["id"]."',
			'".$_SESSION["userId"]."',
			'".$_GET["a"]."',
			now()
		)
	");
?>

<form id="voteTopicSuccess" class="dialog" method="post" target="_self" action="redirect.php?url=index.php">
	<fieldset>
    <h1>Thank you!</h1>
    <p align="center">Your vote has been successfully submitted.</p>
    <p align="center"><input class="submit" type="submit" name="submit" value="Continue" /></p>
  </fieldset>
</form>

<?php 
	require_once("end.php"); 
?>